1. Field of the Invention
The present invention relates generally to the field of parallel processing and, more specifically, to a method macro expander.
2. Description of the Related Art
In a typical processing environment, and especially in a graphics processing environment, there is a large amount of state information that is transmitted by an application to facilitate the processing of input data in a processing pipeline. The state information is transmitted by the application executing in a central processing unit (CPU) to an external processing unit, such as a graphics processing unit (GPU), via a driver.
The bandwidth of the channel that carries state information from the CPU to the GPU is often very limited. Additionally, each packet transmitted over such a channel is a fixed size. Most users of state information, however, do not exhaustively use the entire packet in which the state information is transmitted. This results in the unfortunate disadvantage of underutilizing the bandwidth on the channel between the CPU and GPU.
Additionally, the format of the rackets transmitted from the CPU to the GPU is typically fixed. A format optimized to accommodate the needs of a highly specialized application may require the transmission of extra state information for applications with a more modest feature set. A format optimized for the performance of a minimal application may require extra processing work to pack together various pieces of state set independently.
As the foregoing illustrates, what is needed in the art is a mechanism for efficiently transmitting state information to the GPU over a limited-bandwidth channel and for providing a flexible interface to accept state information in a variety of formats.